// const obj1 = {
//   age: 18,
//   name: 'zg'
// }
// const descriptor1 = Object.getOwnPropertyDescriptor(obj1, 'age');
// console.log(descriptor1);
/**结果
{
  "value": 18,
  "writable": true,
  "enumerable": true,
  "configurable": true
}
*/

const obj1 = {
  age: 18,
  name: 'zg'
}
const descriptor1 = Object.getOwnPropertyDescriptors(obj1);
console.log(descriptor1);
/**结果
{
  "age": {
    "value": 18,
    "writable": true,
    "enumerable": true,
    "configurable": true
  },
  "name": {
    "value": "zg",
    "writable": true,
    "enumerable": true,
    "configurable": true
  }
}
*/
